Developer Documentation

QuickTime 4 API Documentation

QuickTime 4 Reference

| Previous | Chapter Contents | Chapter Top | Next |

Sources for Input Images

These functions specify the source for input images. You must specify a source before you can call GraphicsExportDoExport .

The source can be a QuickTime graphics importer component instance, a QuickDraw Picture, a GWorld or a PixMap . Or it can be a piece of compressed data described by an image description. Compressed data can be in a file, handle, pointer, or other data reference.

The application must make sure that the source is not disposed of before the graphics exporter instance is closed or given a new source.

All of these functions are implemented by the base graphics exporter. Format-specific importers should delegate all of them.


GraphicsExportSetInputDataReference

Specifies that the source image is a compressed image stored in a data reference.

pascal ComponentResult GraphicsExportSetInputDataReference ( GraphicsExportComponent ci,
                                         Handle dataRef,
                                         OSType dataRefType,
                                         ImageDescriptionHandle desc);
ci
Specifies the component instance that identifies your connection to the graphics exporter component.
dataRef
A QuickTime data reference.
dataRefType
The data reference type.
desc
A handle to an image description, describing the compressed data.

GraphicsExportGetInputDataReference

Returns the current input data reference.

pascal ComponentResult GraphicsExportGetInputDataReference ( GraphicsExportComponent ci,
                                         Handle *dataRef,
                                         OSType *dataRefType);
ci
Specifies the component instance that identifies your connection to the graphics exporter component.
dataRef
Points to a variable to receive the data reference handle.
dataRefType
Points to a variable to receive the data reference type.

The caller is responsible for disposing of the returned data reference handle.

DISCUSSION

If the current source is not a data reference, the function returns paramErr .

RESULT CODES

paramErr -50 The source is not a data reference. (Handles and files can be described by data references.)

GraphicsExportSetInputFile

Specifies that the source image is a compressed image stored in a file.

pascal ComponentResult GraphicsExportSetInputFile (
                     GraphicsExportComponent ci,
                                         const FSSpec *theFile,
                                         ImageDescriptionHandle desc);
ci
Specifies the component instance that identifies your connection to the graphics exporter component.
theFile
A pointer to the file specification of the file containing the graphics data.
desc
A handle to an image description which describes the compressed data.

GraphicsExportGetInputFile

Returns the current input file.

pascal ComponentResult GraphicsExportGetInputFile (
                     GraphicsExportComponent ci,
                                         FSSpec *theFile);
ci
Specifies the component instance that identifies your connection to the graphics exporter component.
theFile
A pointer to the file specification of the file containing the graphics data.

DISCUSSION

If the current source is not a file, the function returns paramErr .

RESULT CODES

paramErr -50 The source is not a file.

GraphicsExportSetInputHandle

Specifies that the source image is a compressed image stored in a handle.

pascal ComponentResult GraphicsExportSetInputHandle (GraphicsExportComponent ci,
                                         Handle h,
                                         ImageDescriptionHandle desc);
ci
Specifies the component instance that identifies your connection to the graphics exporter component.
h
Specifies a handle containing graphics data.
desc
A handle to an image description which describes the compressed data.

GraphicsExportGetInputHandle

Returns the current input handle.

pascal ComponentResult GraphicsExportGetInputHandle (GraphicsExportComponent ci,
                                         Handle *h);
ci
Specifies the component instance that identifies your connection to the graphics exporter component.
h
A pointer to receive the handle.

DISCUSSION

If the current source is not a handle, the function returns paramErr .

RESULT CODES

paramErr -50 The source is not a handle.

GraphicsExportSetInputPtr

Specifies that the source image is a compressed image stored at a fixed address in memory.

pascal ComponentResult GraphicsExportSetInputPtr (
                     GraphicsExportComponent ci,
                                         Ptr p,
                                         unsigned long size,
                                         ImageDescriptionHandle desc);
ci
Specifies the component instance that identifies your connection to the graphics exporter component.
p
A pointer to a value the image.
size
A value describing the size of the image data in bytes.
desc
A handle to an image description which describes the compressed data.

GraphicsExportGetInputPtr

Returns the current input pointer.

pascal ComponentResult GraphicsExportGetInputPtr (
                     GraphicsExportComponent ci,
                                         Ptr *p,
                                         unsigned long *size);
ci
Specifies the component instance that identifies your connection to the graphics exporter component.
p
A pointer to receive a pointer containing the graphics data.
size
A pointer to a value describing the size of the image data in bytes.

RESULT CODES

paramErr -50 The source is not a pointer.

GraphicsExportSetInputGraphicsImporter

Specifies that the source image is to be drawn by a graphics importer instance.

pascal ComponentResult GraphicsExportSetInputGraphicsImporter ( GraphicsExportComponent ci,
                                         GraphicsImportComponent grip);
ci
Specifies the component instance that identifies your connection to the graphics exporter component.
grip
Specifies the source graphics importer component instance.

It is the caller's responsibility to dispose of the graphics importer.


GraphicsExportGetInputGraphicsImporter

Returns the current input graphics importer instance.

pascal ComponentResult GraphicsExportGetInputGraphicsImporter ( GraphicsExportComponent ci,
                                         GraphicsImportComponent *grip);
ci
Specifies the component instance that identifies your connection to the graphics exporter component.
grip
Points to a variable to receive the source graphics importer.

RESULT CODES

paramErr -50 The current source is not a graphics exporter.

GraphicsExportSetInputPicture

Specifies that the source image is a picture.

pascal ComponentResult GraphicsExportSetInputPicture (GraphicsExportComponent ci,
                                         PicHandle picture);
ci
Specifies the component instance that identifies your connection to the graphics exporter component.
picture
Specifies the source picture.

GraphicsExportGetInputPicture

Returns the current input picture.

pascal ComponentResult GraphicsExportGetInputPicture (GraphicsExportComponent ci,
                                         PicHandle *picture);
ci
Specifies the component instance that identifies your connection to the graphics exporter component.
picture
Points to a variable to receive the source picture.

RESULT CODES

paramErr -50 The current source is not a picture.

GraphicsExportSetInputGWorld

Specifies that the source image is a GWorld .

pascal ComponentResult GraphicsExportSetInputGWorld (GraphicsExportComponent ci,
                                         GWorldPtr gworld);
ci
Specifies the component instance that identifies your connection to the graphics exporter component.
gworld
Specifies the source GWorld .

DISCUSSION

The gworld parameter must be a real GWorld ; you may not pass an ordinary color GrafPort. The graphics exporter will never dispose the GWorld .

RESULT CODES

noErr 0 No error
paramErr -50 Invalid parameter specified

GraphicsExportGetInputGWorld

Returns the current input GWorld .

pascal ComponentResult GraphicsExportGetInputGWorld (GraphicsExportComponent ci,
                                         GWorldPtr *gworld);
ci
Specifies the component instance that identifies your connection to the graphics exporter component.
gworld
Points to a variable to receive the source GWorld .

RESULT CODES

noErr 0 No error
paramErr -50 The source is not a GWorld

GraphicsExportSetInputPixmap

Specifies that the source image is a pixmap.

pascal ComponentResult GraphicsExportSetInputPixmap (GraphicsExportComponent ci,
                                         PixMapHandle pixmap);
ci
Specifies the component instance that identifies your connection to the graphics exporter component.
pixmap
Specifies the source PixMap .

It is the caller's responsibility to dispose of the pixmap.


GraphicsExportGetInputPixmap

Returns the current input pixmap.

pascal ComponentResult GraphicsExportGetInputPixmap (GraphicsExportComponent ci,
                                         PixMapHandle *pixmap);
ci
Specifies the component instance that identifies your connection to the graphics exporter component.
pixmap
Points to a variable to receive the source PixMap .

RESULT CODES

paramErr -50 The source is not a PixMap.

© 1999 Apple Computer, Inc.

| Previous | Chapter Contents | Chapter Top | Next |